home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / SecalDemo / Inc / libraries / realtime.inc < prev    next >
Text File  |  1998-06-24  |  3KB  |  120 lines

  1. include "inc/exec/types.inc";
  2. include "inc/exec/lists.inc";
  3. include "inc/exec/libraries.inc";
  4. include "inc/utility/tagitem.inc";
  5. include "inc/utility/hooks.inc";
  6.  
  7. def TICK_FREQ = 1200;
  8.  
  9. struct Conductor is
  10.   cdt_Link:Node;
  11.   cdt_Reserved0:uword;
  12.   cdt_Players:MinList;
  13.   cdt_ClockTime:ulong;
  14.   cdt_StartTime:ulong;
  15.   cdt_ExternalTime:ulong;
  16.   cdt_MaxExternalTime:ulong;
  17.   cdt_Metronome:ulong;
  18.   cdt_Reserved1:uword;
  19.   cdt_Flags:uword;
  20.   cdt_State:ubyte;
  21. ;
  22.  
  23. def CONDUCTF_EXTERNAL = (1<<0);
  24. def CONDUCTF_GOTTICK = (1<<1);
  25. def CONDUCTF_METROSET = (1<<2);
  26. def CONDUCTF_PRIVATE = (1<<3);
  27.  
  28. def CONDUCTB_EXTERNAL = 0;
  29. def CONDUCTB_GOTTICK = 1;
  30. def CONDUCTB_METROSET = 2;
  31. def CONDUCTB_PRIVATE = 3;
  32.  
  33. def CONDSTATE_STOPPED = 0;
  34. def CONDSTATE_PAUSED = 1;
  35. def CONDSTATE_LOCATE = 2;
  36. def CONDSTATE_RUNNING = 3;
  37.  
  38. def CONDSTATE_METRIC = -1;
  39. def CONDSTATE_SHUTTLE = -2;
  40. def CONDSTATE_LOCATE_SET = -3;
  41.  
  42. struct Player is
  43.   pl_Link:Node;
  44.   pl_Reserved0:byte;
  45.   pl_Reserved1:byte;
  46.   pl_Hook:ulong;
  47.   pl_Source:ulong;
  48.   pl_Task:ulong;
  49.   pl_MetricTime:long;
  50.   pl_AlarmTime:long;
  51.   pl_UserData:ulong;
  52.   pl_PlayerID:uword;
  53.   pl_Flags:uword;
  54. ;
  55.  
  56. def PLAYERF_READY = (1<<0);
  57. def PLAYERF_ALARMSET = (1<<1);
  58. def PLAYERF_QUIET = (1<<2);
  59. def PLAYERF_CONDUCTED = (1<<3);
  60. def PLAYERF_EXTSYNC = (1<<4);
  61.  
  62. def PLAYERB_READY = 0;
  63. def PLAYERB_ALARMSET = 1;
  64. def PLAYERB_QUIET = 2;
  65. def PLAYERB_CONDUCTED = 3;
  66. def PLAYERB_EXTSYNC = 4;
  67.  
  68. def PLAYER_Base = (TAG_USER+64);
  69.  
  70. def PLAYER_Hook = (PLAYER_Base+1);
  71. def PLAYER_Name = (PLAYER_Base+2);
  72. def PLAYER_Priority = (PLAYER_Base+3);
  73. def PLAYER_Conductor = (PLAYER_Base+4);
  74. def PLAYER_Ready = (PLAYER_Base+5);
  75. def PLAYER_AlarmTime = (PLAYER_Base+12);
  76. def PLAYER_Alarm = (PLAYER_Base+13);
  77. def PLAYER_AlarmSigTask = (PLAYER_Base+6);
  78. def PLAYER_AlarmSigBit = (PLAYER_Base+8);
  79. def PLAYER_Conducted = (PLAYER_Base+7);
  80. def PLAYER_Quiet = (PLAYER_Base+9);
  81. def PLAYER_UserData = (PLAYER_Base+10);
  82. def PLAYER_ID = (PLAYER_Base+11);
  83. def PLAYER_ExtSync = (PLAYER_Base+14);
  84. def PLAYER_ErrorCode = (PLAYER_Base+15);
  85.  
  86. def PM_TICK = 0;
  87. def PM_STATE = 1;
  88. def PM_POSITION = 2;
  89. def PM_SHUTTLE = 3;
  90.  
  91. struct pmTime is
  92.   pmt_Method:ulong;
  93.   pmt_Time:ulong;
  94. ;
  95.  
  96. struct pmState is
  97.   pms_Method:ulong;
  98.   pms_OldState:ulong;
  99. ;
  100.  
  101. def RT_CONDUCTORS = 0;
  102.  
  103. def RTE_NOMEMORY = 801;
  104. def RTE_NOCONDUCTOR = 802;
  105. def RTE_NOTIMER = 803;
  106. def RTE_PLAYING = 804;
  107.  
  108. struct RealTimeLibBase is
  109.   rtb_LibNode:Library;
  110.   rtb_Reserved0[2]:ubyte;
  111.   rtb_Time:ulong;
  112.   rtb_TimeFrac:ulong;
  113.   rtb_Reserved1:uword;
  114.   rtb_TickErr:word;
  115. ;
  116.  
  117. def RealTime_TickErr_Min = -705;
  118. def RealTime_TickErr_Max = 705;
  119.  
  120.